import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooUserSignController } from '../../../controllers';
const uctoouserSignRouter = new Router();
const userSignController = new uctooUserSignController();

uctoouserSignRouter.post('/add', requireUser, userSignController.add);
uctoouserSignRouter.post('/edit', requireUser, rowLevelPermission('uctoo/user_sign'), userSignController.edit);
uctoouserSignRouter.post('/del', requireUser, rowLevelPermission('uctoo/user_sign'), userSignController.delete);

//For getting userSign with permission control
uctoouserSignRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/user_sign'), userSignController.getSingle);
uctoouserSignRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/user_sign'), userSignController.getMany);
uctoouserSignRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/user_sign'), userSignController.getMany);

//#endregion AutoCreateCode
export default uctoouserSignRouter;
